<template>
  <div>
    <h3>1.props父子传参</h3>
    <h4>{{ count }}</h4>
    <Child :count="count" :addCount="addCount" />
    <!--  -->
    <!-- <Child v-model="count" /> -->
  </div>
</template>

<script>
import Child from "./child.vue";
export default {
  name: "Props",
  data() {
    return {
      count: 0,
    };
  },
  components: {
    Child,
  },
  methods: {
    addCount(value) {
      this.count += value;
    },
  },
  mounted() {
    console.log(this.$children, "children");
  },
};
</script>

<style>
</style>